package com.kt.app.ui.components


import androidx.compose.foundation.clickable
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.compose.ui.Modifier
import androidx.compose.ui.tooling.preview.Preview

@Composable
fun StateSample() {
    var count by remember { mutableStateOf(0) }
    Text(text = "State Sample $count", modifier = Modifier.clickable {
        count++
    })
}

@Preview
@Composable
fun StateSamplePreview() {
    StateSample()
}

